<% layout('/layouts/default.html', {title: '音频题题库管理', libs: ['validate','fileupload']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header with-border">
			<div class="box-title">
				<i class="fa icon-note"></i> ${text(taudioBank.isNewRecord ? '新增音频题题库' : '编辑音频题题库')}
			</div>
			<div class="box-tools pull-right">
				<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
			</div>
		</div>
		<#form:form id="inputForm" model="${taudioBank}" action="${ctx}/zx/audio/bank/taudioBank/save" method="post" class="form-horizontal">
			<div class="box-body">
				<div class="form-unit">${text('基本信息')}</div>
				<#form:hidden path="id"/>
				<div class="row">
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2" title="">
								<span class="required hide">*</span> ${text('音频地址')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-5">
							<#form:fileupload path="audio" 
								id="audio" 
								returnPath="true"
								filePathInputId="audio"
								maxUploadNum="1"
								uploadType="all" class="" readonly="false"/>
								<#form:input path="audio" name="audio" class="form-control required hide"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2" title="">
								<span class="required hide">*</span> ${text('岗位编码')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-5">
							<#form:select path="post" items="${postList}"
									itemLabel="postName" itemValue="postCode" blankOption="true" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2" title="">
								<span class="required hide">*</span> ${text('考试类别')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-5">
							<#form:select path="category" dictType="t_examination_category" blankOption="true" class="form-control" />
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2" title="">
								<span class="required hide">*</span> ${text('困难程度')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-5">
							<#form:select path="difficulty" dictType="t_degree_difficulty" blankOption="true" class="form-control" />
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2" title="">
								<span class="required hide">*</span> ${text('知识类型')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-5">
							<#form:select path="knowledgePointType" dictType="t_knowledge_point_type" blankOption="true" class="form-control" />
							</div>
						</div>
					</div>
				</div>
				
			</div>
			<div class="box-footer">
				<div class="row">
					<div class="col-sm-offset-2 col-sm-10">
						<% if (hasPermi('zx:audio:bank:taudioBank:edit')){ %>
							<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('保 存')}</button>&nbsp;
						<% } %>
						<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
					</div>
				</div>
			</div>
		</#form:form>
	</div>
</div>
<% } %>
<script>
$("#inputForm").validate({
	submitHandler: function(form){
		js.ajaxSubmitForm($(form), function(data){
			js.showMessage(data.message);
			if(data.result == Global.TRUE){
				js.closeCurrentTabPage(function(contentWindow){
					contentWindow.page();
				});
			}
		}, "json");
    }
});
</script>